<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #d1 {
            width: 200px;
            height: 200px;
            background-color: red;
            overflow: hidden;/*解决粘连问题*/

        }

        #d1 > div {
            width: 50px;
            height: 50px;
            background-color: blue;
            margin-left: 50px;
            /*元素上级和上级元素上边缘重叠时,会出现粘连问题在上添加overflow:hidden;*/
            margin-top:100px;

        }

        #d2{
            width: 100px;
            height: 100px;

            border: 10px solid red;
            border-radius: 100px;
            /*设置圆角,超过宽高一半为正圆*/
        }

        #d3{
            width: 50px;
            height: 50px;
            border: 1px solid blue;
            /*给元素添加宽高,会影响元素的宽高*/
            padding-left: 50px;
            padding-top: 50px;
        }
    </style>
</head>
<body>

<div id="d2">边框测试</div>
<div id="d3">内边距测试</div>
<div id="d1">
    <div></div>
</div>
</body>
</html>